<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/jsp/includes/fw/core/include_taglib_core.jsp"%>
<!DOCTYPE html>
<html lang="">
<head>
<%@ include file="/WEB-INF/views/jsp/includes/fw/core/include_meta.jsp"%>
<%@ include file="/WEB-INF/views/jsp/includes/fw/core/include_html5.jsp"%>
<%@ include file="/WEB-INF/views/jsp/includes/fw/core/include_ie.jsp"%>
<%@ include file="/WEB-INF/views/jsp/includes/fw/core/include_jquery.jsp"%>
	<script type="text/javascript" src="${plugin}/tab/js/framework.js"></script>
	<link href="${plugin}/tab/css/import_basic.css" rel="stylesheet" type="text/css"/>
	<link  rel="stylesheet" type="text/css" id="skin" prePath="${plugin}/tab/" />
	<script type="text/javascript" charset="utf-8" src="${plugin}/tab/js/tab.js"></script>
<title>首页</title>
</head>
<body>
<button id="add">add</button>
<div id="tab_menu" style="height:30px;"></div>
<div style="width:100%;">
	<div id="page" style="width:100%;height:100%;"></div>
</div>		
</body>
<script type="text/javascript">
function tabAddHandler(mid,mtitle,murl){
	tab.update({
		id :mid,
		title :mtitle,
		url :murl,
		isClosed :true
	});
	tab.add({
		id :mid,
		title :mtitle,
		url :murl,
		isClosed :true
	});

	tab.activate(mid);
}
 var tab;	
 jQuery(function($) {
	 tab = new TabView( {
		containerId :'tab_menu',
		pageid :'page',
		cid :'tab1',
		position :"top"
	});
	tab.add( {
		id :'tab1_index1',
		title :"主页",
		url :ctx+"/test.jsp",
		isClosed :false
	});
	/**tab.add( {
		id :'tab1_index1',
		title :"主页",
		url :"/per/undoTask!gettwo",
		isClosed :false
	});
	**/
	$("#add").on("click",function(){
		tab.add( {
			id :'tab1_index2',
			title :"主页1",
			url :ctx+"/test2.jsp",
			isClosed :true
		});
	});
});

	function cmainFrameT(){
		var hmainT = document.getElementById("page");
		var bheightT = document.documentElement.clientHeight;
		hmainT .style.width = '100%';
		hmainT .style.height = (bheightT  - 51) + 'px';
	}
	cmainFrameT();
	window.onresize=function(){  
		cmainFrameT();
	};

</script>
</html>